<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Hero War:  Fichier source de C:/Documents and Settings/israhal17/Bureau/devel/HeroWar/include/gfx/MapLayer.h</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css">
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Généré par Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="../../index.html"><span>Page&nbsp;principale</span></a></li>
      <li><a href="../../namespaces.html"><span>Espaces&nbsp;de&nbsp;nommage</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Fichiers</span></a></li>
      <li><a href="../../examples.html"><span>Exemples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="../../files.html"><span>Liste&nbsp;des&nbsp;fichiers</span></a></li>
    </ul>
  </div>
<h1>C:/Documents and Settings/israhal17/Bureau/devel/HeroWar/include/gfx/MapLayer.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef MAPLAYER_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define MAPLAYER_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;SFML/Graphics.hpp&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;gfx/Map.h&gt;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="keyword">namespace </span>gfx
<a name="l00008"></a>00008 {
<a name="l00009"></a>00009 
<a name="l00016"></a><a class="code" href="../../d0/d1c/namespacegfx.html#d36691b69ef221131fbe25be4de15885">00016</a> <span class="keyword">typedef</span> std::map&lt;int,const sf::Drawable*&gt; <a class="code" href="../../d0/d1c/namespacegfx.html#d36691b69ef221131fbe25be4de15885" title="Tileset qui associe un nombre dans la matrice de la map à un sf::Drawable.">TileSet</a>;
<a name="l00017"></a>00017 <span class="keyword">typedef</span> TileSet::iterator itTile;
<a name="l00018"></a>00018 
<a name="l00023"></a><a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html">00023</a> <span class="keyword">class </span><a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html" title="Map qui affiche dynamiquement des drawable un par un selon le viewport.">MapLayer</a> : <span class="keyword">public</span> sf::Drawable,
<a name="l00024"></a>00024         <span class="keyword">public</span> <a class="code" href="../../dc/dcf/classgfx_1_1_map.html" title="Classes qui gère la matrices d&amp;#39;une map.">Map</a>
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keyword">public</span>:
<a name="l00033"></a>00033         <a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html#ae3b52f6e114949c5c777827e9c3fafd">MapLayer</a>(       <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; w,
<a name="l00034"></a>00034                                 <span class="keyword">const</span> <span class="keywordtype">int</span>&amp; h,
<a name="l00035"></a>00035                                 <a class="code" href="../../d0/d1c/namespacegfx.html#d36691b69ef221131fbe25be4de15885" title="Tileset qui associe un nombre dans la matrice de la map à un sf::Drawable.">TileSet</a>* tileSet,
<a name="l00036"></a>00036                                 <span class="keyword">const</span> sf::IntRect&amp; tileDim);
<a name="l00037"></a>00037 
<a name="l00038"></a>00038         ~<a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html" title="Map qui affiche dynamiquement des drawable un par un selon le viewport.">MapLayer</a>(<span class="keywordtype">void</span>);
<a name="l00039"></a>00039 
<a name="l00041"></a>00041         sf::IntRect <a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html#3cc8cb4f735c95027fb6478b69b52e13" title="Retourne la dimensio d&amp;#39;un tile normal.">getTileRect</a>() <span class="keyword">const</span>;
<a name="l00042"></a>00042 
<a name="l00048"></a>00048         <span class="keywordtype">void</span> <a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html#a7a329ace4ebd8d11579b31aca7aa935" title="Ajoute un tile au TileSet.">setTile</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keyword">const</span> sf::Drawable* tile);
<a name="l00049"></a>00049 
<a name="l00051"></a>00051         <span class="keywordtype">void</span> <a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html#1f7740fe56fe3aa582a06bc5f193f164" title="Définie la zone à afficher (viewport).">setSubRect</a> (<span class="keyword">const</span> sf::FloatRect SubRect);
<a name="l00052"></a>00052 
<a name="l00054"></a>00054         sf::FloatRect <a class="code" href="../../d2/dc0/classgfx_1_1_map_layer.html#39d75fe21d1db46dee231f815fa64019" title="Retourne la zone à afficher (viewport).">getSubRect</a>() <span class="keyword">const</span>;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="keyword">protected</span>:
<a name="l00057"></a>00057         <span class="keyword">virtual</span> <span class="keywordtype">void</span> Render(sf::RenderTarget&amp; Target) <span class="keyword">const</span>;
<a name="l00058"></a>00058 
<a name="l00059"></a>00059 <span class="keyword">private</span>:
<a name="l00060"></a>00060         <span class="comment">//viewport</span>
<a name="l00061"></a>00061         sf::FloatRect m_subRect;
<a name="l00062"></a>00062 
<a name="l00063"></a>00063         <span class="comment">//Dimension d'un tile</span>
<a name="l00064"></a>00064         sf::IntRect m_tileDim;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066         <span class="comment">//TileSet</span>
<a name="l00067"></a>00067         <a class="code" href="../../d0/d1c/namespacegfx.html#d36691b69ef221131fbe25be4de15885" title="Tileset qui associe un nombre dans la matrice de la map à un sf::Drawable.">TileSet</a>* m_tileSet;
<a name="l00068"></a>00068 };
<a name="l00069"></a>00069 
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Généré le Wed Feb 4 02:28:38 2009 pour Hero War par&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>
